Skip to content

feat: add toolset presets for large MCP clients - #51

Merged
Siumauricio merged 2 commits into
Dokploy:mainfrom
franktronics:fix/toolset-presets
Aug 7, 2026
Merged

feat: add toolset presets for large MCP clients#51
Siumauricio merged 2 commits into
Dokploy:mainfrom
franktronics:fix/toolset-presets

Conversation

@franktronics

Copy link
Copy Markdown
Contributor

Summary

Add toolset presets and exclusion filters so users can reduce the number of MCP tools exposed to clients/providers that struggle with very large tool lists.

By default, behavior stays unchanged: all Dokploy tools are loaded.

Changes

  • Add DOKPLOY_TOOL_PRESET
    • all (default)
    • minimal
    • core
    • deploy
    • databases
    • git
  • Add DOKPLOY_DISABLED_TAGS to exclude categories after selecting a preset or explicit tag list.
  • Keep DOKPLOY_ENABLED_TAGS as exact-control override.
  • Add logging for selected toolset, loaded tool count, and large toolset warnings.
  • Document presets, precedence, and troubleshooting guidance.
  • Add tests for default behavior, presets, explicit tags, disabled tags, and invalid preset fallback.

Presets

  • minimal: project, application
  • core: project, server, application
  • deploy: project, environment, server, application, domain, deployment
  • databases: postgres, redis, mysql, mariadb, mongo, libsql
  • git: github, gitlab, bitbucket, gitea, gitProvider, registry, sshKey

Why

The server exposes hundreds of tools when all Dokploy API categories are enabled. Some MCP clients and LLM providers can time out(e.g. GPT models) or fail when ingesting very large tool lists.

This allows us to maintain full API coverage by default while providing users with a documented way to reduce the number of tools.

Configuration precedence

  1. DOKPLOY_ENABLED_TAGS takes precedence when set.
  2. Otherwise DOKPLOY_TOOL_PRESET selects a predefined toolset.
  3. DOKPLOY_DISABLED_TAGS is applied last.
  4. Default remains DOKPLOY_TOOL_PRESET=all.

Testing

  • npx --yes pnpm@10.24.0 test -- src/server.test.ts
  • npx --yes pnpm@10.24.0 type-check
  • npx --yes pnpm@10.24.0 lint
  • npx --yes pnpm@10.24.0 build

Manual smoke checks:

  • default loads 524 tools
  • DOKPLOY_TOOL_PRESET=minimal loads 40 tools
  • DOKPLOY_TOOL_PRESET=core loads 57 tools
  • DOKPLOY_ENABLED_TAGS=project,application,postgres loads 56 tools

franktronics and others added 2 commits August 6, 2026 23:36
…eploy preset

Hardcoded tool counts break every time the OpenAPI spec is re-synced
(the toolset already grew from 524 to 546 while this PR was open), so
the tests now compute expected counts by filtering generatedTools by
tag. Also adds the compose tag to the deploy preset — Docker Compose is
a first-class deployment type in Dokploy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Siumauricio
Siumauricio force-pushed the fix/toolset-presets branch from b3f27f2 to ee10e36 Compare August 7, 2026 05:38
@Siumauricio

Copy link
Copy Markdown
Contributor

Rebased this branch onto main and pushed two maintainer commits, @franktronics — the feature itself is unchanged:

  1. Conflict resolution: main had gained the schema-sanitization tests from fix: strip unsupported regex patterns from tool schemas #58/fix: strip regex patterns invalid under strict provider validators #68 in server.test.ts; both sets of tests now coexist.
  2. Test robustness: the preset tests asserted hardcoded tool counts (524/40/57/64), which had already drifted — the toolset grew to 546 while this PR was open after an OpenAPI re-sync. Expected counts are now derived by filtering generatedTools by tag, so future spec syncs won't break them.
  3. Preset tweak: added compose to the deploy preset (and its README row) — Docker Compose is a first-class deployment type in Dokploy, so deploy users would expect those tools included.

All 12 tests, type-check, and build pass. Thanks for the contribution — this is a genuinely useful feature for clients that struggle with large tool lists!

@Siumauricio
Siumauricio merged commit fc65234 into Dokploy:main Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants